<!-- ServiceCard.vue -->
<template>
  <div 
    class="service-card" 
    @click="$emit('click')"
    :style="cardStyle"
  >
    <div class="card-content">
      <h3 class="card-title">{{ title }}</h3>
      <p class="card-description">{{ description }}</p>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      required: true
    },
    description: {
      type: String,
      required: true
    },
    // 移除icon相关prop
    cardStyle: {
      type: Object,
      default: () => ({
        backgroundColor: '#FFFFFF'
      })
    }
  }
}
</script>

<style scoped>
.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  height: 100%;
  min-height: 180px;
  box-sizing: border-box;
  border: 1px solid #EBEEF5;
}

.card-content {
  text-align: center;
  width: 100%;
}

.card-title {
  margin: 0 0 12px;
  font-size: 18px;
  color: #303133;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-description {
  margin: 0;
  font-size: 14px;
  color: #909399;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* 悬停效果 */
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: transparent;
}

/* 激活状态 */
.service-card:active {
  transform: translateY(0);
}
</style>